Skip to content

Conversation

@philipphofmann
Copy link
Member

📜 Description

Automatically captured HTTP client errors now mark sessions as errored.

💡 Motivation and Context

Fixes GH-3742

💚 How did you test it?

Unit tests and manually capturing a HTTP client error via the sample app: https://sentry-sdks.sentry.io/explore/releases/philipp-test-client-errors%2B1.0.0/?issuesType=all&project=5428557

Screenshot 2025-11-03 at 11 53 57

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 95.65217% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.983%. Comparing base (26c5e2c) to head (989feb1).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
SentryTestUtils/Sources/TestClient.swift 77.777% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #6633       +/-   ##
=============================================
- Coverage   85.006%   84.983%   -0.024%     
=============================================
  Files          452       452               
  Lines        27686     27690        +4     
  Branches     12157     12152        -5     
=============================================
- Hits         23535     23532        -3     
- Misses        4105      4114        +9     
+ Partials        46        44        -2     
Files with missing lines Coverage Δ
SentryTestUtils/Sources/TestHub.swift 85.714% <100.000%> (+1.843%) ⬆️
Sources/Sentry/SentryClient.m 97.267% <100.000%> (+0.009%) ⬆️
Sources/Sentry/SentryHub.m 96.268% <100.000%> (-0.266%) ⬇️
Sources/Sentry/SentryNetworkTracker.m 100.000% <100.000%> (ø)
SentryTestUtils/Sources/TestClient.swift 84.905% <77.777%> (-1.887%) ⬇️

... and 11 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26c5e2c...989feb1. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1204.63 ms 1227.62 ms 22.99 ms
Size 24.14 KiB 1.01 MiB 1014.11 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
b44bf23 1214.60 ms 1251.75 ms 37.15 ms
b115f82 1212.96 ms 1251.92 ms 38.96 ms
664c060 1215.48 ms 1244.41 ms 28.93 ms
939d583 1209.96 ms 1251.09 ms 41.13 ms
f83dcc4 1210.88 ms 1246.22 ms 35.35 ms
f246093 1219.75 ms 1247.35 ms 27.60 ms
7a8b167 1217.49 ms 1247.67 ms 30.18 ms
ea3f7b6 1228.14 ms 1258.71 ms 30.57 ms
f8cad3c 1217.94 ms 1257.96 ms 40.02 ms
9c75c11 1228.42 ms 1262.81 ms 34.39 ms

App size

Revision Plain With Sentry Diff
b44bf23 23.75 KiB 1022.78 KiB 999.03 KiB
b115f82 23.75 KiB 989.04 KiB 965.30 KiB
664c060 23.74 KiB 977.41 KiB 953.67 KiB
939d583 23.75 KiB 1023.82 KiB 1000.07 KiB
f83dcc4 23.75 KiB 1.02 MiB 1019.11 KiB
f246093 23.75 KiB 1022.79 KiB 999.04 KiB
7a8b167 24.14 KiB 1.01 MiB 1014.00 KiB
ea3f7b6 23.75 KiB 1.01 MiB 1008.77 KiB
f8cad3c 23.75 KiB 1.01 MiB 1016.13 KiB
9c75c11 23.74 KiB 1022.95 KiB 999.20 KiB

Previous results on branch: fix/client-error-session-error

Startup times

Revision Plain With Sentry Diff
26f6484 1214.64 ms 1247.59 ms 32.95 ms
99ac7d1 1212.64 ms 1237.16 ms 24.52 ms
e886f08 1213.26 ms 1242.90 ms 29.64 ms
016277f 1218.59 ms 1258.81 ms 40.22 ms
f67de13 1212.63 ms 1242.78 ms 30.15 ms
f7802af 1228.92 ms 1259.16 ms 30.24 ms
23a141f 1220.30 ms 1253.12 ms 32.82 ms

App size

Revision Plain With Sentry Diff
26f6484 23.75 KiB 1.00 MiB 1001.02 KiB
99ac7d1 23.75 KiB 1.02 MiB 1016.55 KiB
e886f08 23.75 KiB 1.02 MiB 1020.21 KiB
016277f 23.75 KiB 1.00 MiB 1001.09 KiB
f67de13 23.75 KiB 1.00 MiB 1001.01 KiB
f7802af 23.75 KiB 1.00 MiB 1001.07 KiB
23a141f 23.75 KiB 1.02 MiB 1016.68 KiB

@philipphofmann philipphofmann marked this pull request as ready for review November 3, 2025 15:53
@philipphofmann
Copy link
Member Author

Failing UI tests will be fixed with #6650.

Copy link
Member

@philprime philprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost LGTM

@philipphofmann
Copy link
Member Author

Back to draft, because I'm trying to get rid of many NSBlocks.

@philipphofmann philipphofmann marked this pull request as draft November 4, 2025 15:57
@philipphofmann philipphofmann added the ready-to-merge Use this label to trigger all PR workflows label Nov 13, 2025
@github-actions
Copy link
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentryNetworkTracker.m

@philipphofmann philipphofmann marked this pull request as ready for review November 13, 2025 10:30
Copy link
Member

@philprime philprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@philipphofmann philipphofmann merged commit 474ae14 into main Nov 13, 2025
194 of 200 checks passed
@philipphofmann philipphofmann deleted the fix/client-error-session-error branch November 13, 2025 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP Client Errors don't impact session

3 participants